package org.come.setup;

import com.tool.btn.FormsOnOffBtn;
import com.tool.tcpimg.UIUtils;
import org.come.setup.XSeTupBtn;
import org.come.setup.XSeTupJpanelxz;
import org.come.setup.XSeTupJpanelzr;

import javax.swing.*;
import java.awt.*;



public class XSeTupJpanel extends JPanel {

    private XSeTupJpanelzr xSeTupJpanelzr;
    private XSeTupBtn labAttr,// 点击跳到每日任务
            labTalent,// 点击跳到任务日历
    labTalent1,// 点击跳到试练幻境
    labTalent2;// 点击跳到竞技场


    public XSeTupJpanel() throws Exception {
    		this.setPreferredSize(new Dimension(438, 350));
            this.setLayout(null);
            this.setBackground(UIUtils.Color_BACK);
            // 关闭按钮事件
            FormsOnOffBtn offBtn = new FormsOnOffBtn("inkImg/old/2/1.png", 1, 3102);
            offBtn.setBounds(438 - 37, 10, 25, 25);
            this.add(offBtn);

            xSeTupJpanelzr = new XSeTupJpanelzr();
            xSeTupJpanelzr.setBounds(40, 60, 358, 250);
            this.add(xSeTupJpanelzr);

            // 点击跳到每日任务
            labAttr = new XSeTupBtn("skin/8100226/newbutton/K06.png", 1);
            labAttr.setBounds(55, 20, 95, 33);
            labAttr.addMouseListener(new XSeTupJpanelxz(1, xSeTupJpanelzr));
            this.add(labAttr);
            // 点击跳到任务日历
            labTalent = new XSeTupBtn("skin/8100226/newbutton/K07.png", 1);
            labTalent.setBounds(55 + (95+8)*1, 20, 95, 33);
            labTalent.addMouseListener(new XSeTupJpanelxz(2, xSeTupJpanelzr));
            this.add(labTalent);
//            // 点击跳到试练幻境
//            labTalent1 = new XSeTupBtn(imageMap.getImgMap().get("K09"),"K09", 1);
//            labTalent1.setBounds(55 + (95+8)*2, 20, 95, 33);
//            labTalent1.addMouseListener(new XSeTupJpanelxz(3, xSeTupJpanelzr));
//            this.add(labTalent1);
//            // 点击跳到竞技场
//           labTalent2 = new XSeTupBtn(imageMap.getImgMap().get("K11"),"K11", 1);
//           labTalent2.setBounds(55 + (95+8)*3, 20, 95, 33);
//           labTalent2.addMouseListener(new XSeTupJpanelxz(4, xSeTupJpanelzr));
//           this.add(labTalent2);
    }

    ImageIcon icon;
    ImageIcon icon2;

    @Override
    protected void paintComponent(Graphics g) {
        super.paintComponent(g);
        	// 小孩信息栏
            if (icon == null) {
                icon = new ImageIcon("skin/8100226/newbutton/B211.png");
            }
            g.drawImage(icon.getImage(), 0, 0, 438, 350, this);
            if (icon2 != null) {
                g.drawImage(icon2.getImage(), 112, 34, 199, 299, this);
            }
    }


    int p = -1;


    public XSeTupJpanelzr getXSeTupJpanelzr() {
        return xSeTupJpanelzr;
    }

    public void setXSeTupJpanelzr(XSeTupJpanelzr xSeTupJpanelzr) {
        this.xSeTupJpanelzr = xSeTupJpanelzr;
    }

    public XSeTupBtn getLabAttr() {
        return labAttr;
    }

    public void setLabAttr(XSeTupBtn labAttr) {
        this.labAttr = labAttr;
    }

    public XSeTupBtn getLabTalent() {
        return labTalent;
    }

    public void setLabTalent(XSeTupBtn labTalent) {
        this.labTalent = labTalent;
    }

    public XSeTupBtn getLabTalent1() {
        return labTalent1;
    }

    public void setLabTalent1(XSeTupBtn labTalent1) {
        this.labTalent1 = labTalent1;
    }

    public XSeTupBtn getLabTalent2() {
        return labTalent2;
    }

    public void setLabTalent2(XSeTupBtn labTalent2) {
        this.labTalent2 = labTalent2;
    }



}
